#ifndef _CAMERA_H_
#define _CAMERA_H_

#include <gl/glu.h>
#include <vmath.h>

class Camera
{
public:
    Camera();
    ~Camera();

    // changes the camera orientation & position
    void updateView(float dx, float dy);
    void updateZoom(float dr);

    // updates openGL modelview-matrix
    void recalculate();

    const Vector3f& getPosition() const;

private:

    void axisAngleToMatrix(Vector3f axis, float angle, Matrix3f& m);

    Vector3f _position, _up;

    float _zoom;
    const float _minZoom, _maxZoom, _zoomFactor;

    const float _minAngle, _maxAngle, _rotFactor;

};

#endif // _CAMERA_H_
